function Trig_DinoDeath_Actions takes nothing returns nothing
	local unit deadDino = GetTriggerUnit()
	local integer dinoHandle = GetHandleId(deadDino)
	local trigger controlTrigger = LoadTriggerHandle(udg_UnitDataHashTable , dinoHandle , StringHash("DINO_CONTROL_TRIGGER"))
	local triggercondition controlTriggerCondition = LoadTriggerConditionHandle(udg_UnitDataHashTable , dinoHandle , StringHash("udg_DINO_CONTROL_TRIGGER_CONDITION"))
	local player killingPlayer = GetOwningPlayer(GetKillingUnit())
	//--
	if controlTrigger != null then
		call TriggerRemoveCondition(controlTrigger , controlTriggerCondition)
		call FlushChildHashtable(udg_UnitDataHashTable , dinoHandle)
		call DestroyTrigger(controlTrigger)
		call DisplayTextToPlayer(GetLocalPlayer() , 0 , 0 , udg_PlayerColors[GetPlayerId(killingPlayer)] + GetPlayerName(killingPlayer) + "|r" + " 殺死了一隻" + GetUnitName(deadDino) + "!")
		set udg_AmountOfAliveDinos = udg_AmountOfAliveDinos - 1
		call LeaderboardSetItemValue(bj_lastCreatedLeaderboard , LeaderboardGetPlayerIndex(bj_lastCreatedLeaderboard , Player(11)) , udg_AmountOfAliveDinos)
		if udg_AmountOfAliveDinos <= 0 then
			call TriggerExecute(gg_trg_Victory)
		endif
	endif
	//--
	set deadDino = null
	set controlTrigger = null
	set controlTriggerCondition = null
	set killingPlayer = null
endfunction

function InitTrig_DinoDeath takes nothing returns nothing
	set gg_trg_DinoDeath = CreateTrigger()
	call TriggerRegisterPlayerUnitEvent(gg_trg_DinoDeath , Player(11) , EVENT_PLAYER_UNIT_DEATH , null)
	call TriggerAddAction(gg_trg_DinoDeath , function Trig_DinoDeath_Actions)
endfunction